﻿using System;
using System.Collections.Generic;
using System.Data;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class control_tour_RightTourKhuyenMai : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
        }
    }
    protected string GetListTourKM()
    {
        string htmlCode = "";
        DataTable dt = new DataTable();
        dt = DataAccess.ExeSQLToDataTable("select top(3) * from dev_news where khuyenmai = 1 order by idnews desc");
        if (dt.Rows.Count>0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                htmlCode += @"<li>
                <a class='name_tour_km' href='chitiettourdulich.aspx?id="+dr[0]+@"'>"+ITNLip.CatChuoi(dr["title"].ToString(),30)+@"</a>
                <img class='pic_tour_km' src='files_upload/images/pictour/" + dr["picture"] + @"'/>
                <p class='gia_tour_km'>" + string.Format("{0:0,0}", dr["giatour"]) + " VNĐ" + @"</p>
            </li>";
            }
        }
        return htmlCode;
    }
}